#pragma once
#include "Common.h"
#include "Object.h"

extern "C"{
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
}

NS_BEGIN

class Script:
	public Object
{
public:
	Script();
	~Script();
public:
	bool 				open(const char *filename);
	lua_State*			getHandle(){return pState;}
	int 				readInt(const char *key);
	bool 				readBoolean(const char *key);
	const char*			readString(const char *key);
private:
	lua_State*			pState;
};
NS_END